

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Yozeev.SystemConfig.BasicConfig;

namespace Yozeev.EntityMapper.DateDictionarys
{
    public class DateDictionaryCfg : IEntityTypeConfiguration<DateDictionary>
    {
        public void Configure(EntityTypeBuilder<DateDictionary> builder)
        {

            builder.ToTable("DateDictionarys", YoYoAbpefCoreConsts.SchemaNames.Basic);

            
			builder.Property(a => a.DictionaryName).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.DictionaryCode).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.Sort).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.ParentId).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			//builder.Property(a => a.Parent).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.Explain).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);


        }
    }
}


